home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / ear / mui23dev.lha / MUI / Developer / Assembler / Examples / MUI-Demo.s
Text File  |  1993-11-19  |  34KB  |  1,067 lines

  1. **
  2. **       Assembler Source Code For The MUI Demo Program
  3. **       ----------------------------------------------
  4. **
  5. **              written 1993 by Henri Veisterä
  6. **
  7. **         (modified from the C code by Stefan Stuntz)
  8. **
  9. ** Even if it doesn't look so, all of the code below is pure Assembler,
  10. ** just a little bit enhanced with some MUI specific macros.
  11. **
  12.  
  13.         opt    o+,c+,l+
  14.  
  15.         XREF    _DoMethod
  16.  
  17.         bra    _main
  18.  
  19.         include    "exec/types.i"
  20.         include    "exec/libraries.i"
  21.         include    "exec/memory.i"
  22.         include    "exec/exec_lib.i"
  23.  
  24.         include    "dos/dos_lib.i"
  25.         include    "dos/dosextens.i
  26.  
  27.         include    "intuition/intuition_lib.i"
  28.  
  29.         include    "libraries/gadtools.i"
  30.  
  31.         include    "libraries/mui_lib.i"
  32.         include    "libraries/mui.i"
  33.         include    "libraries/mui_asm.i"
  34.  
  35.  
  36. **
  37. ** Some Macros to make my life easier and the actual source
  38. ** code more readable.
  39. **
  40.  
  41. Listi MACRO ; ftxt
  42.    ListviewObject
  43.       MUIT MUIA_Weight,50,MUIA_Listview_Input,FALSE,MUIA_Listview_List
  44.       FloattextObject
  45.      MUIT MUIA_Frame,MUIV_FrameReadList,MUIA_Floattext_Text,\1,MUIA_Floattext_TabSize,4,MUIA_Floattext_Justify,TRUE,Endi
  46.       Endi
  47.    ENDM
  48.  
  49. DemoWindow MACRO ; name,id,info
  50.    WindowObject
  51.       MUIT MUIA_Window_Title,\1,MUIA_Window_ID,\2,WindowContents
  52.       VGroup
  53.      Childi Listi,\3
  54.    ENDM
  55.  
  56. ImageLine MACRO ; name,nr
  57.    HGroup
  58.       Childi TextObject
  59.      MUIT MUIA_Text_PreParse,PreParse2,MUIA_Text_Contents,\1,MUIA_FixWidthTxt,rbut1,Endi
  60.       Childi VGroup
  61.      Childi VSpace,0
  62.      Child3 ImageObject,MUIT,MUIA_Image_Spec,\2,Endi
  63.      Childi VSpace,0
  64.      Endi
  65.       Endi
  66.    ENDM
  67.  
  68. ScaledImage MACRO ; nr,s,x,y
  69.    ImageObject
  70.       MUIT MUIA_Image_Spec,\1,MUIA_FixWidth,\3,MUIA_FixHeight,\4
  71.       MUIT MUIA_Image_FreeHoriz,TRUE,MUIA_Image_FreeVert,TRUE
  72.       MUIT MUIA_Image_State,\2
  73.       Endi
  74.    ENDM
  75.  
  76. HProp MACRO
  77.    PropObject
  78.       PropFrame
  79.       MUIT MUIA_Prop_Horiz,TRUE,MUIA_FixHeight,8,MUIA_Prop_Entries,111,MUIA_Prop_Visible,10
  80.       Endi
  81.    ENDM
  82.  
  83. VProp MACRO
  84.    PropObject
  85.       PropFrame
  86.       MUIT MUIA_Prop_Horiz,FALSE,MUIA_FixWidth,8,MUIA_Prop_Entries,111,MUIA_Prop_Visible,10
  87.       Endi
  88.    ENDM
  89.  
  90. *** See if we were run from Workbench, if so, get msg and reply to it
  91.  
  92. _main        move.l    $4,_ExecBase
  93.  
  94.         sub.l    a1,a1
  95.         CALLEXEC FindTask
  96.         move.l    d0,a4
  97.  
  98.         tst.l    pr_CLI(a4)
  99.         beq.s    fromWorkbench
  100.  
  101. *** we were called from the CLI
  102.  
  103.         bra.s    end_startup
  104.  
  105. *** we were called from the Workbench
  106.  
  107. fromWorkbench    lea    pr_MsgPort(a4),a0
  108.         CALLEXEC WaitPort
  109.         lea    pr_MsgPort(a4),a0
  110.         CALLEXEC GetMsg
  111.         move.l    d0,returnMsg
  112.  
  113. *** call our program
  114.  
  115. end_startup    bsr.s    main
  116.  
  117. *** returns to here with exit code in d0
  118.  
  119.         move.l    d0,-(sp)
  120.  
  121.         tst.l    returnMsg
  122.         beq.s    exitToDOS
  123.  
  124.         CALLEXEC Forbid
  125.         move.l    returnMsg(pc),a1
  126.         CALLEXEC ReplyMsg
  127.  
  128. exitToDOS    move.l    (sp)+,d0
  129.         rts
  130.  
  131. *** Open all libraries
  132.  
  133. main        lea    dosname(pc),a1
  134.         move.l    #36,d0
  135.         CALLEXEC OpenLibrary
  136.         move.l    d0,_DOSBase
  137.         beq    end
  138.  
  139.         lea    muimname(pc),a1
  140.         move.l    #MUIMASTER_VMIN,d0
  141.         CALLEXEC OpenLibrary
  142.         move.l    d0,_MUIMasterBase
  143.         beq    closedos
  144.  
  145.         lea    intname(pc),a1
  146.         move.l    #37,d0
  147.         CALLEXEC OpenLibrary
  148.         move.l    d0,_IntuitionBase
  149.         beq    closemui
  150.  
  151. *** Allocate space for tagitems.  Your program gets the maximum
  152. *** tagspace usage in bytes in the variable TAG_SPACE.
  153. *** Allocated space must be passed in the address register MR.
  154.  
  155. MR        EQUR    a4
  156.  
  157.         move.l    tagspace(pc),d0
  158.         move.l    #MEMF_ANY,d1
  159.         CALLEXEC AllocMem
  160.         move.l    d0,tag_mem
  161.         beq    closeint
  162.         move.l    d0,MR
  163.  
  164.  
  165. **
  166. ** Every MUI application needs an application object
  167. ** which will hold general information and serve as
  168. ** a kind of anchor for user input, ARexx functions,
  169. ** commodities interface, etc.
  170. **
  171. ** An application may have any number of SubWindows
  172. ** which can all be created in the same call or added
  173. ** later, according to your needs.
  174. **
  175. ** Note that creating a window does not mean to
  176. ** open it, this will be done later by setting
  177. ** the windows open attribute.
  178. **
  179.  
  180.         ApplicationObject
  181.            MUIT MUIA_Application_Title,titl1
  182.            MUIT MUIA_Application_Version,vers1
  183.            MUIT MUIA_Application_Copyright,copy1
  184.            MUIT MUIA_Application_Author,auth1
  185.            MUIT MUIA_Application_Description,desc1
  186.            MUIT MUIA_Application_Base,base1
  187.            MUIT MUIA_Application_Menu,MyMenus
  188.  
  189.            SubWindowi
  190.               DemoWindow stri1,"STRG",IN_String
  191.              Childi ListviewObject
  192.                 MUIT MUIA_Listview_Input,TRUE,MUIA_Listview_List
  193.                 ListObject
  194.                    InputListFrame
  195.                    Endi
  196.                 Endi
  197.                 is LV_Brian
  198.              Child2 StringObject,StringFrame,Endi
  199.              is ST_Brian
  200.              Endi
  201.               Endi
  202.               is WI_String
  203.  
  204.            SubWindowi
  205.               DemoWindow cycl1,"CYCL",IN_Cycle
  206.              Childi HGroup
  207.                 Childi Radio,comp1,CYA_Computer
  208.                 is MT_Computer
  209.                 Childi VGroup
  210.                    Childi Radio,prin1,CYA_Printer
  211.                    is MT_Printer
  212.                    Childi VSpace,0
  213.                    Childi Radio,disp1,CYA_Display
  214.                    is MT_Display
  215.                    Endi
  216.                 Childi VGroup
  217.                    Childi ColGroup,2
  218.                   GroupFrameT cycl2
  219.                   Childi Label1,comp2
  220.                   Childi KeyCycle,CYA_Computer,"c"
  221.                   is CY_Computer
  222.                   Childi Label1,prin2
  223.                   Childi KeyCycle,CYA_Printer,"p"
  224.                   is CY_Printer
  225.                   Childi Label1,disp2
  226.                   Childi KeyCycle,CYA_Display,"d"
  227.                   is CY_Display
  228.                   Endi
  229.                    Childi ListviewObject
  230.                   MUIT MUIA_Listview_Input,TRUE
  231.                   MUIT MUIA_Listview_List
  232.                   ListObject
  233.                      InputListFrame
  234.                      Endi
  235.                       Endi
  236.                       is LV_Computer
  237.                    Endi
  238.                 Endi
  239.              Endi
  240.               Endi
  241.               is WI_Cycle
  242.  
  243.            SubWindowi
  244.               DemoWindow list1,"LIST",IN_Listviews
  245.              Childi HGroup
  246.                 GroupFrameT dire1
  247.                 Childi ListviewObject
  248.                    MUIT MUIA_Listview_Input,TRUE
  249.                    MUIT MUIA_Listview_MultiSelect,TRUE
  250.                    MUIT MUIA_Listview_List
  251.                    DirlistObject
  252.                   InputListFrame
  253.                   MUIT MUIA_Dirlist_Directory,ram1,Endi
  254.                    Endi
  255.                    is LV_Directory
  256.                 Childi ListviewObject
  257.                    MUIT MUIA_Weight,20
  258.                    MUIT MUIA_Listview_Input,TRUE
  259.                    MUIT MUIA_Listview_List
  260.                    VolumelistObject
  261.                   InputListFrame
  262.                   MUIT MUIA_Dirlist_Directory,ram1,Endi
  263.                    Endi
  264.                    is LV_Volumes
  265.                 Endi
  266.              Endi
  267.               Endi
  268.               is WI_Listviews
  269.  
  270.            SubWindowi
  271.               DemoWindow noti1,"BRCA",IN_Notify
  272.              Childi HGroup
  273.                 GroupFrameT conn1
  274.                 Child2 GaugeObject,GaugeFrame
  275.                    MUIT MUIA_Gauge_Horiz,FALSE,MUIA_FixWidth,16,Endi
  276.                    is GA_Gauge1
  277.                 Childi VProp
  278.                 is PR_PropL
  279.                 Childi VProp
  280.                 is PR_PropR
  281.                 Childi VGroup
  282.                    Childi VSpace,0
  283.                    Childi HProp
  284.                    is PR_PropA
  285.                    Childi HGroup
  286.                   Childi HProp
  287.                   is PR_PropH
  288.                   Childi HProp
  289.                   is PR_PropV
  290.                   Endi
  291.                    Childi VSpace,0
  292.                    Childi VGroup
  293.                   GroupSpacing 1
  294.                   Child2 GaugeObject,GaugeFrame
  295.                      MUIT MUIA_Gauge_Horiz,TRUE,Endi
  296.                      is GA_Gauge2
  297.                   Child3 ScaleObject,MUIT,MUIA_Scale_Horiz,TRUE,Endi
  298.                   Endi
  299.                    Childi VSpace,0
  300.                    Endi
  301.                 Childi VProp
  302.                 is PR_PropT
  303.                 Childi VProp
  304.                 is PR_PropB
  305.                 Child2 GaugeObject,GaugeFrame
  306.                    MUIT MUIA_Gauge_Horiz,FALSE,MUIA_FixWidth,16,Endi
  307.                    is GA_Gauge3
  308.                 Endi
  309.              Endi
  310.               Endi
  311.               is WI_Notify
  312.  
  313.            SubWindowi
  314.               DemoWindow back1,"BACK",IN_Backfill
  315.              Childi VGroup
  316.                 GroupFrameT stan1
  317.                 Childi HGroup
  318.                    Child2 RectangleObject,TextFrame
  319.                       MUIT MUIA_Background,MUII_BACKGROUND,Endi
  320.                        Child2 RectangleObject,TextFrame
  321.                           MUIT MUIA_Background,MUII_FILL,Endi
  322.                        Child2 RectangleObject,TextFrame
  323.                           MUIT MUIA_Background,MUII_SHADOW,Endi
  324.                    Endi
  325.                 Childi HGroup
  326.                        Child2 RectangleObject,TextFrame
  327.                           MUIT MUIA_Background,MUII_SHADOWBACK,Endi
  328.                        Child2 RectangleObject,TextFrame
  329.                           MUIT MUIA_Background,MUII_SHADOWFILL,Endi
  330.                        Child2 RectangleObject,TextFrame
  331.                           MUIT MUIA_Background,MUII_SHADOWSHINE,Endi
  332.                    Endi
  333.                 Childi HGroup
  334.                        Child2 RectangleObject,TextFrame
  335.                           MUIT MUIA_Background,MUII_FILLBACK,Endi
  336.                        Child2 RectangleObject,TextFrame
  337.                           MUIT MUIA_Background,MUII_SHINEBACK,Endi
  338.                        Child2 RectangleObject,TextFrame
  339.                           MUIT MUIA_Background,MUII_FILLSHINE,Endi
  340.                    Endi
  341.                 Endi
  342.              Endi
  343.               Endi
  344.               is WI_Backfill
  345.  
  346.            SubWindowi
  347.               DemoWindow grou1,"GRPS",IN_Groups
  348.              Child3 HGroup,GroupFrameT,grou2
  349.                 Child3 HGroup,GroupFrameT,hori1
  350.                    Child2 RectangleObject,TextFrame,Endi
  351.                    Child2 RectangleObject,TextFrame,Endi
  352.                    Child2 RectangleObject,TextFrame,Endi
  353.                    Endi
  354.                 Child3 VGroup,GroupFrameT,vert1
  355.                    Child2 RectangleObject,TextFrame,Endi
  356.                    Child2 RectangleObject,TextFrame,Endi
  357.                    Child2 RectangleObject,TextFrame,Endi
  358.                    Endi
  359.                 Childi ColGroup,3
  360.                    GroupFrameT arra1
  361.                    Child2 RectangleObject,TextFrame,Endi
  362.                    Child2 RectangleObject,TextFrame,Endi
  363.                    Child2 RectangleObject,TextFrame,Endi
  364.                    Child2 RectangleObject,TextFrame,Endi
  365.                    Child2 RectangleObject,TextFrame,Endi
  366.                    Child2 RectangleObject,TextFrame,Endi
  367.                    Child2 RectangleObject,TextFrame,Endi
  368.                    Child2 RectangleObject,TextFrame,Endi
  369.                    Endi
  370.                 Endi
  371.              Child3 HGroup,GroupFrameT,diff1
  372.                 Child2 TextObject,TextFrame
  373.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,kg25,MUIA_Weight,25,Endi
  374.                 Child2 TextObject,TextFrame
  375.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,kg50,MUIA_Weight,50,Endi
  376.                 Child2 TextObject,TextFrame
  377.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,kg75,MUIA_Weight,75,Endi
  378.                 Child2 TextObject,TextFrame
  379.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,kg100,MUIA_Weight,100,Endi
  380.                 Endi
  381.              Child3 HGroup,GroupFrameT,fixe1
  382.                 Child2 TextObject,TextFrame
  383.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,fixe2,MUIA_Text_SetMax,TRUE,Endi
  384.                 Child2 TextObject,TextFrame
  385.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,free1,MUIA_Text_SetMax,FALSE,Endi
  386.                 Child2 TextObject,TextFrame
  387.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,fixe2,MUIA_Text_SetMax,TRUE,Endi
  388.                 Child2 TextObject,TextFrame
  389.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,free1,MUIA_Text_SetMax,FALSE,Endi
  390.                 Child2 TextObject,TextFrame
  391.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,fixe2,MUIA_Text_SetMax,TRUE,Endi
  392.                 Endi
  393.              Endi
  394.               Endi
  395.               is WI_Groups
  396.  
  397.            SubWindowi
  398.               DemoWindow fram1,"FRMS",IN_Frames
  399.                  Childi ColGroup,2
  400.                 Child2 TextObject,ButtonFrame
  401.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,butt1,Endi
  402.                 Child2 TextObject,ImageButtonFrame
  403.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,imag1,Endi
  404.                 Child2 TextObject,TextFrame
  405.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,text1,Endi
  406.                 Child2 TextObject,StringFrame
  407.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,stri2,Endi
  408.                 Child2 TextObject,ReadListFrame
  409.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,read1,Endi
  410.                 Child2 TextObject,InputListFrame
  411.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,inpu1,Endi
  412.                 Child2 TextObject,PropFrame
  413.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,prop1,Endi
  414.                 Child2 TextObject,GroupFrame
  415.                    MUIT MUIA_Background,MUII_TextBack,MUIA_Text_Contents,grou3,Endi
  416.                 Endi
  417.              Endi
  418.               Endi
  419.               is WI_Frames
  420.  
  421.            SubWindowi
  422.               DemoWindow imag2,"IMGS",IN_Images
  423.                  Childi HGroup
  424.                 Child3 VGroup,GroupFrameT,stan2
  425.                    Childi ImageLine,arro1,MUII_ArrowUp
  426.                    Childi ImageLine,arro2,MUII_ArrowDown
  427.                    Childi ImageLine,arro3,MUII_ArrowLeft
  428.                    Childi ImageLine,arro4,MUII_ArrowRight
  429.                    Childi ImageLine,radi1,MUII_RadioButton
  430.                    Childi ImageLine,file1,MUII_PopFile
  431.                    Childi ImageLine,hard1,MUII_HardDisk
  432.                    Childi ImageLine,disk1,MUII_Disk
  433.                    Childi ImageLine,chip1,MUII_Chip
  434.                    Childi ImageLine,draw1,MUII_Drawer
  435.                    Endi
  436.                 Child3 VGroup,GroupFrameT,scal1
  437.                    Childi VSpace,0
  438.                    Childi HGroup
  439.                   Childi ScaledImage,MUII_RadioButton,1,17,9
  440.                   Childi ScaledImage,MUII_RadioButton,1,20,12
  441.                   Childi ScaledImage,MUII_RadioButton,1,23,15
  442.                   Childi ScaledImage,MUII_RadioButton,1,26,18
  443.                   Childi ScaledImage,MUII_RadioButton,1,29,21
  444.                   Endi
  445.                    Childi VSpace,0
  446.                    Childi HGroup
  447.                   Childi ScaledImage,MUII_CheckMark,1,13,7
  448.                   Childi ScaledImage,MUII_CheckMark,1,16,10
  449.                   Childi ScaledImage,MUII_CheckMark,1,19,13
  450.                   Childi ScaledImage,MUII_CheckMark,1,22,16
  451.                   Childi ScaledImage,MUII_CheckMark,1,25,19
  452.                   Childi ScaledImage,MUII_CheckMark,1,28,22
  453.                   Endi
  454.                    Childi VSpace,0
  455.                    Childi HGroup
  456.                   Childi ScaledImage,MUII_PopFile,0,12,10
  457.                   Childi ScaledImage,MUII_PopFile,0,15,13
  458.                   Childi ScaledImage,MUII_PopFile,0,18,16
  459.                   Childi ScaledImage,MUII_PopFile,0,21,19
  460.                   Childi ScaledImage,MUII_PopFile,0,24,22
  461.                   Childi ScaledImage,MUII_PopFile,0,27,25
  462.                   Endi
  463.                    Childi VSpace,0
  464.                    Endi
  465.                 Endi
  466.              Endi
  467.               Endi
  468.               is WI_Images
  469.  
  470.            SubWindowi
  471.               WindowObject
  472.               MUIT MUIA_Window_Title,titl1
  473.               MUIT MUIA_Window_ID,"MAIN",WindowContents
  474.               VGroup
  475.              Child2 TextObject,GroupFrame
  476.                 MUIT MUIA_Background,MUII_SHADOWFILL
  477.                 MUIT MUIA_Text_Contents,tcon1,Endi
  478.  
  479.              Childi Listi,IN_Master
  480.  
  481.              Childi VGroup
  482.                 GroupFrameT avad1
  483.                 Childi HGroup
  484.                    MUIT MUIA_Group_SameWidth,TRUE
  485.                    Childi KeyButton,grou4,"g"
  486.                    is BT_Groups
  487.                    Childi KeyButton,fram2,"f"
  488.                    is BT_Frames
  489.                    Childi KeyButton,back2,"b"
  490.                    is BT_Backfill
  491.                    Endi
  492.                 Childi HGroup
  493.                    MUIT MUIA_Group_SameWidth,TRUE
  494.                    Childi KeyButton,noti2,"n"
  495.                    is BT_Notify
  496.                    Childi KeyButton,list2,"l"
  497.                    is BT_Listviews
  498.                    Childi KeyButton,cycl3,"c"
  499.                    is BT_Cycle
  500.                    Endi
  501.                 Childi HGroup
  502.                    MUIT MUIA_Group_SameWidth,TRUE
  503.                    Childi KeyButton,imag3,"i"
  504.                    is BT_Images
  505.                    Childi KeyButton,stri3,"s"
  506.                    is BT_String
  507.                    Childi KeyButton,quit1,"q"
  508.                    is BT_Quit
  509.                    Endi
  510.                 Endi
  511.              Endi
  512.               Endi
  513.               is WI_Master
  514.  
  515.            Endi
  516.            is AP_Demo
  517.  
  518.  
  519. **
  520. ** See if the application was created. The fail function
  521. ** deletes every created object and closes everything.
  522. **
  523. ** Note that we do not need any
  524. ** error control for the sub objects since every error
  525. ** will automatically be forwarded to the parent object
  526. ** and cause this one to fail too.
  527. **
  528.  
  529.         tst.l    AP_Demo
  530.         beq    fail
  531.  
  532.  
  533. **
  534. ** Here comes the broadcast magic. Notifying means:
  535. ** When an attribute of an object changes, then please change
  536. ** another attribute of another object (accordingly) or send
  537. ** a method to another object.
  538. **
  539.  
  540. **
  541. ** Lets bind the sub windows to the corresponding button
  542. ** of the master window.
  543. **
  544.  
  545.     DoMethod BT_Frames,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Frames,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  546.     DoMethod BT_Images,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Images,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  547.     DoMethod BT_Notify,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Notify,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  548.     DoMethod BT_Listviews,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Listviews,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  549.     DoMethod BT_Groups,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Groups,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  550.     DoMethod BT_Backfill,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Backfill,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  551.     DoMethod BT_Cycle,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_Cycle,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  552.     DoMethod BT_String,#MUIM_Notify,#MUIA_Pressed,#FALSE,WI_String,#3,#MUIM_Set,#MUIA_Window_Open,#TRUE
  553.  
  554.     DoMethod BT_Quit,#MUIM_Notify,#MUIA_Pressed,#FALSE,AP_Demo,#2,#MUIM_Application_ReturnID,#MUIV_Application_ReturnID_Quit
  555.  
  556.  
  557. **
  558. ** Automagically remove a window when the user hits the close gadget.
  559. **
  560.  
  561.     DoMethod WI_Images,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Images,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  562.     DoMethod WI_Frames,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Frames,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  563.     DoMethod WI_Notify,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Notify,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  564.     DoMethod WI_Listviews,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Listviews,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  565.     DoMethod WI_Groups,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Groups,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  566.     DoMethod WI_Backfill,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Backfill,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  567.     DoMethod WI_Cycle,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_Cycle,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  568.     DoMethod WI_String,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,WI_String,#3,#MUIM_Set,#MUIA_Window_Open,#FALSE
  569.  
  570.  
  571. **
  572. ** Closing the master window forces a complete shutdown of the application.
  573. **
  574.  
  575.     DoMethod WI_Master,#MUIM_Notify,#MUIA_Window_CloseRequest,#TRUE,AP_Demo,#2,#MUIM_Application_ReturnID,#MUIV_Application_ReturnID_Quit
  576.  
  577.  
  578. **
  579. ** This connects the prop gadgets in the broadcast demo window.
  580. **
  581.  
  582.     DoMethod PR_PropA,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropH,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  583.     DoMethod PR_PropA,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropV,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  584.     DoMethod PR_PropH,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropL,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  585.     DoMethod PR_PropH,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropR,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  586.     DoMethod PR_PropV,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropT,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  587.     DoMethod PR_PropV,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,PR_PropB,#3,#MUIM_Set,#MUIA_Prop_First,#MUIV_TriggerValue
  588.  
  589.     DoMethod PR_PropA,#MUIM_Notify,#MUIA_Prop_First,#MUIV_EveryTime,GA_Gauge2,#3,#MUIM_Set,#MUIA_Gauge_Current,#MUIV_TriggerValue
  590.     DoMethod GA_Gauge2,#MUIM_Notify,#MUIA_Gauge_Current,#MUIV_EveryTime,GA_Gauge1,#3,#MUIM_Set,#MUIA_Gauge_Current,#MUIV_TriggerValue
  591.     DoMethod GA_Gauge2,#MUIM_Notify,#MUIA_Gauge_Current,#MUIV_EveryTime,GA_Gauge3,#3,#MUIM_Set,#MUIA_Gauge_Current,#MUIV_TriggerValue
  592.  
  593.  
  594. **
  595. ** And here we connect cycle gadgets, radio buttons and the list in the
  596. ** cycle & radio window.
  597. **
  598.  
  599.     DoMethod CY_Computer,#MUIM_Notify,#MUIA_Cycle_Active,#MUIV_EveryTime,MT_Computer,#3,#MUIM_Set,#MUIA_Radio_Active,#MUIV_TriggerValue
  600.     DoMethod CY_Printer,#MUIM_Notify,#MUIA_Cycle_Active,#MUIV_EveryTime,MT_Printer,#3,#MUIM_Set,#MUIA_Radio_Active,#MUIV_TriggerValue
  601.     DoMethod CY_Display,#MUIM_Notify,#MUIA_Cycle_Active,#MUIV_EveryTime,MT_Display,#3,#MUIM_Set,#MUIA_Radio_Active,#MUIV_TriggerValue
  602.     DoMethod MT_Computer,#MUIM_Notify,#MUIA_Radio_Active,#MUIV_EveryTime,CY_Computer,#3,#MUIM_Set,#MUIA_Cycle_Active,#MUIV_TriggerValue
  603.     DoMethod MT_Printer,#MUIM_Notify,#MUIA_Radio_Active,#MUIV_EveryTime,CY_Printer,#3,#MUIM_Set,#MUIA_Cycle_Active,#MUIV_TriggerValue
  604.     DoMethod MT_Display,#MUIM_Notify,#MUIA_Radio_Active,#MUIV_EveryTime,CY_Display,#3,#MUIM_Set,#MUIA_Cycle_Active,#MUIV_TriggerValue
  605.     DoMethod MT_Computer,#MUIM_Notify,#MUIA_Radio_Active,#MUIV_EveryTime,LV_Computer,#3,#MUIM_Set,#MUIA_List_Active,#MUIV_TriggerValue
  606.     DoMethod LV_Computer,#MUIM_Notify,#MUIA_List_Active ,#MUIV_EveryTime,MT_Computer,#3,#MUIM_Set,#MUIA_Radio_Active,#MUIV_TriggerValue
  607.  
  608.  
  609. **
  610. ** This one makes us receive input ids from several list views.
  611. **
  612.  
  613.     DoMethod LV_Volumes,#MUIM_Notify,#MUIA_Listview_DoubleClick,#TRUE,AP_Demo,#2,#MUIM_Application_ReturnID,#ID_NEWVOL
  614.     DoMethod LV_Brian,#MUIM_Notify,#MUIA_List_Active,#MUIV_EveryTime,AP_Demo,#2,#MUIM_Application_ReturnID,#ID_NEWBRI
  615.  
  616.  
  617. **
  618. ** Now lets set the TAB cycle chain for some of our windows.
  619. **
  620.  
  621.     DoMethod WI_Master,#MUIM_Window_SetCycleChain,BT_Groups,BT_Frames,BT_Backfill,BT_Notify,BT_Listviews,BT_Cycle,BT_Images,BT_String,NULL
  622.     DoMethod WI_Listviews,#MUIM_Window_SetCycleChain,LV_Directory,LV_Volumes,NULL
  623.     DoMethod WI_Cycle,#MUIM_Window_SetCycleChain,MT_Computer,MT_Printer,MT_Display,CY_Computer,CY_Printer,CY_Display,LV_Computer,NULL
  624.     DoMethod WI_String,#MUIM_Window_SetCycleChain,ST_Brian,NULL
  625.  
  626.  
  627. **
  628. ** Set some start values for certain objects.
  629. **
  630.  
  631.     DoMethod LV_Computer,#MUIM_List_Insert,#CYA_Computer,#-1,#MUIV_List_Insert_Bottom
  632.     DoMethod LV_Brian,#MUIM_List_Insert,#LVT_Brian,#-1,#MUIV_List_Insert_Bottom
  633.     seti LV_Computer,#MUIA_List_Active,#0
  634.     seti LV_Brian,#MUIA_List_Active,#0
  635.     seti ST_Brian,#MUIA_String_AttachedList,LV_Brian
  636.  
  637.  
  638. **
  639. ** Everything's ready, lets launch the application. We will
  640. ** open the master window now.
  641. **
  642.  
  643.     seti WI_Master,#MUIA_Window_Open,#TRUE
  644.  
  645.  
  646. **
  647. ** This is the main loop. As you can see, it does just nothing.
  648. ** Everything is handled by MUI, no work for the programmer.
  649. **
  650. ** The only thing we do here is to react on a double click
  651. ** in the volume list (which causes an ID_NEWVOL) by setting
  652. ** a new directory name for the directory list. If you want
  653. ** to see a real file requester with MUI, wait for the
  654. ** next release of MFR :-)
  655. **
  656.  
  657. main_loop    DoMethod AP_Demo,#MUIM_Application_Input,#signal
  658.  
  659.         cmp.l    #MUIV_Application_ReturnID_Quit,d0
  660.         bne    switch1
  661.         move.w    #FALSE,running
  662.         bra    quit_now
  663.  
  664. switch1        cmp.l    #ID_NEWVOL,d0
  665.         bne    switch2
  666.         DoMethod LV_Volumes,#MUIM_List_GetEntry,#MUIV_List_GetEntry_Active,#buf
  667.         seti LV_Directory,#MUIA_Dirlist_Directory,buf
  668.         bra    switch4
  669.  
  670. switch2        cmp.l    #ID_NEWBRI,d0
  671.         bne    switch3
  672.         geti LV_Brian,#MUIA_List_Active,#buf
  673.         move.l    #LVT_Brian,a0
  674.         move.l    buf(pc),d0
  675.         asl.l    #2,d0
  676.         move.l    (a0,d0.l),d0
  677.         seti ST_Brian,#MUIA_String_Contents,d0
  678.         bra    switch4
  679.  
  680. switch3        cmp.l    #ID_ABOUT,d0
  681.         bne    switch4
  682.         MUI_Request AP_Demo,WI_Master,0,NULL,gads1,muid1
  683.         
  684. switch4        move.l    signal(pc),d0
  685.         beq    main_loop
  686.         CALLEXEC Wait
  687.         bra    main_loop
  688.  
  689. quit_now    move.l    #0,error
  690.         bra.s    freemem
  691.  
  692. fail        CALLMUI MUI_Error
  693.         move.w    d0,muierror
  694.  
  695.         move.l   #erro1,d1
  696.         move.l   #muierror,d2
  697.         CALLDOS VPrintf
  698.  
  699. freemem        tst.l    tag_mem
  700.         beq.s    freeobj
  701.         move.l    tagspace(pc),d0
  702.         move.l    tag_mem(pc),a1
  703.         CALLEXEC FreeMem
  704.  
  705. freeobj        tst.l    AP_Demo
  706.         beq.s    closeint
  707.         move.l    AP_Demo(pc),a0
  708.         CALLMUI MUI_DisposeObject
  709.  
  710. closeint    tst.l    _IntuitionBase
  711.         beq.s    closemui
  712.         move.l    _IntuitionBase(pc),a1
  713.         CALLEXEC CloseLibrary
  714.  
  715. closemui    tst.l    _MUIMasterBase
  716.         beq.s    closedos
  717.         move.l    _MUIMasterBase(pc),a1
  718.         CALLEXEC CloseLibrary
  719.  
  720. closedos    tst.l    _DOSBase
  721.         beq.s    end
  722.         move.l    _DOSBase(pc),a1
  723.         CALLEXEC CloseLibrary
  724.  
  725. end        move.l    error(pc),d0
  726.         rts
  727.  
  728.  
  729. *** Library bases
  730.  
  731. _ExecBase    dc.l    0
  732. _DOSBase    dc.l    0
  733. _IntuitionBase    dc.l    0
  734. _MUIMasterBase    dc.l    0
  735.  
  736. *** Library names
  737.  
  738. dosname        dc.b    "dos.library",0
  739. muimname    MUIMASTER_NAME
  740. intname        INTNAME
  741.  
  742. *** Misc. vars
  743.  
  744. returnMsg    dc.l    0
  745. error        dc.l    20
  746. signal        dc.l    0
  747. muierror    dc.w    0
  748. running        dc.w    0
  749. buf        dc.l    0
  750. tag_mem        dc.l    0
  751.  
  752. *** The place to store TAG_SPACE _must_ be after all MUI creation macros.
  753. *** Note: This depends on the order of compilation.  As the MUI macros
  754. *** are compiled, the TAG_SPACE variable is increased.  When we reach
  755. *** this position it has some meaningfull value.
  756.  
  757. tagspace    dc.l    TAG_SPACE
  758.  
  759. ** Misc strings
  760.  
  761. rbut1        dc.b    "RadioButton:",0
  762. base1        dc.b    "MUIDEMO",0
  763. desc1        dc.b    "Demonstrate the features of MUI.",0
  764. auth1        dc.b    "Stefan Stuntz",0
  765. copy1        dc.b    "Copyright ©1993, Stefan Stuntz",0
  766. vers1        dc.b    "$VER: MUI-Demo 4.4 (08.08.93)",0
  767. titl1        dc.b    "MUI-Demo",0
  768. stri1        dc.b    "String",0
  769. cycl1        dc.b    "Cycle Gadgets & RadioButtons",0
  770. comp1        dc.b    "Computer:",0
  771. prin1        dc.b    "Printer:",0
  772. disp1        dc.b    "Display:",0
  773. cycl2        dc.b    "Cycle Gadgets",0
  774. comp2        dc.b    "Computer:",0
  775. prin2        dc.b    "Printer:",0
  776. disp2        dc.b    "Display:",0
  777. list1        dc.b    "Listviews",0
  778. dire1        dc.b    "Dir & Volume List",0
  779. ram1        dc.b    "ram:",0
  780. noti1        dc.b    "Notifying",0
  781. conn1        dc.b    "Connections",0
  782. back1        dc.b    "Backfill",0
  783. stan1        dc.b    "Standard Backgrounds",0
  784. grou1        dc.b    "Groups",0
  785. grou2        dc.b    "Group Types",0
  786. hori1        dc.b    "Horizontal",0
  787. vert1        dc.b    "Vertical",0
  788. arra1        dc.b    "Array",0
  789. diff1        dc.b    "Different Weights",0
  790. kg25        dc.b    27,"c25 kg",0
  791. kg50        dc.b    27,"c50 kg",0
  792. kg75        dc.b    27,"c75 kg",0
  793. kg100        dc.b    27,"c100 kg",0
  794. fixe1        dc.b    "Fixed & Variable Sizes",0
  795. fixe2        dc.b    "fixed",0
  796. free1        dc.b    27,"cfree",0
  797. fram1        dc.b    "Frames",0
  798. butt1        dc.b    27,"cButton",0
  799. imag1        dc.b    27,"cImageButton",0
  800. text1        dc.b    27,"cText",0
  801. stri2        dc.b    27,"cString",0
  802. read1        dc.b    27,"cReadList",0
  803. inpu1        dc.b    27,"cInputList",0
  804. prop1        dc.b    27,"cProp Gadget",0
  805. grou3        dc.b    27,"cGroup",0
  806. imag2        dc.b    "Images",0
  807. stan2        dc.b    "Standard Images",0
  808. arro1        dc.b    "ArrowUp:",0
  809. arro2        dc.b    "ArrowDown:",0
  810. arro3        dc.b    "ArrowLeft:",0
  811. arro4        dc.b    "ArrowRight:",0
  812. radi1        dc.b    "RadioButton:",0
  813. file1        dc.b    "File:",0
  814. hard1        dc.b    "HardDisk:",0
  815. disk1        dc.b    "Disk:",0
  816. chip1        dc.b    "Chip:",0
  817. draw1        dc.b    "Drawer:",0
  818. scal1        dc.b    "Scale Engine",0
  819. tcon1        dc.b    27,"c",27,"8MUI - ",27,"bM",27,"nagic",27,"bU",27,"nser",27,"bI",27,"nnterface",10,"written 1993 by Stefan Stuntz",0
  820. avad1        dc.b    "Available Demos",0
  821. grou4        dc.b    "Groups",0
  822. fram2        dc.b    "Frames",0
  823. back2        dc.b    "Backfill",0
  824. noti2        dc.b    "Notify",0
  825. list2        dc.b    "Listviews",0
  826. cycl3        dc.b    "Cycle",0
  827. imag3        dc.b    "Images",0
  828. stri3        dc.b    "Strings",0
  829. quit1        dc.b    "Quit",0
  830.  
  831. erro1        dc.b    "Failed to create application. MUI Error: %d",10,0
  832. gads1        dc.b    "OK",0
  833. muid1        dc.b    "MUI-Demo",10,"© 1993 by Stefan Stuntz",0
  834.  
  835.  
  836. **
  837. ** A little array definition:
  838. **
  839.  
  840. LVT_Brian    dc.l    str1,str2,str3,str4,str5,str6,str7,str8,str9,str10
  841.         dc.l    str11,str12,str13,str14,str15,str16,str17,str18,str19,str20
  842.         dc.l    str21,str22,str23,str24,str25,str26,str27,str28,str29,str30
  843.         dc.l    str31,str32,str33,str34,str35,str36,str37,str38,str39,str40
  844.         dc.l    str41,str42,str43,str44,str45,str46,str47,NULL
  845. str1        dc.b    "Cheer up, Brian. You know what they say.",0
  846. str2        dc.b    "Some things in life are bad,",0
  847. str3        dc.b    "They can really make you mad.",0
  848. str4        dc.b    "Other things just make you swear and curse.",0
  849. str5        dc.b    "When you're chewing on life's grissle,",0
  850. str6        dc.b    "Don't grumble, give a whistle.",0
  851. str7        dc.b    "And this'll help things turn out for the best,",0
  852. str8        dc.b    "And...",0
  853. str9        dc.b    0
  854. str10        dc.b    "Always look on the bright side of life",0
  855. str11        dc.b    "Always look on the light side of life",0
  856. str12        dc.b    0
  857. str13        dc.b    "If life seems jolly rotten,",0
  858. str14        dc.b    "There's something you've forgotten,",0
  859. str15        dc.b    "And that's to laugh, and smile, and dance, and sing.",0
  860. str16        dc.b    "When you're feeling in the dumps,",0
  861. str17        dc.b    "Don't be silly chumps,",0
  862. str18        dc.b    "Just purse your lips and whistle, that's the thing.",0
  863. str19        dc.b    "And...",0
  864. str20        dc.b    0
  865. str21        dc.b    "Always look on the bright side of life, come on!",0
  866. str22        dc.b    "Always look on the right side of life",0
  867. str23        dc.b    0
  868. str24        dc.b    "For life is quite absurd,",0
  869. str25        dc.b    "And death's the final word.",0
  870. str26        dc.b    "You must always face the curtain with a bow.",0
  871. str27        dc.b    "Forget about your sin,",0
  872. str28        dc.b    "Give the audience a grin.",0
  873. str29        dc.b    "Enjoy it, it's your last chance anyhow,",0
  874. str30        dc.b    "So...",0
  875. str31        dc.b    0
  876. str32        dc.b    "Always look on the bright side of death",0
  877. str33        dc.b    "Just before you draw your terminal breath.",0
  878. str34        dc.b    0
  879. str35        dc.b    "Life's a piece of shit,",0
  880. str36        dc.b    "When you look at it.",0
  881. str37        dc.b    "Life's a laugh, and death's a joke, it's true.",0
  882. str38        dc.b    "You'll see it's all a show,",0
  883. str39        dc.b    "Keep 'em laughing as you go,",0
  884. str40        dc.b    "Just remember that the last laugh is on you.",0
  885. str41        dc.b    "And...",0
  886. str42        dc.b    0
  887. str43        dc.b    "Always look on the bright side of life !",0
  888. str44        dc.b    0
  889. str45        dc.b    "..."
  890. str46        dc.b    0
  891. str47        dc.b    "[Thanx to sprooney@unix1.tcd.ie and to M. Python]",0
  892.         even
  893.  
  894.  
  895. **
  896. ** Convetional GadTools NewMenu structures. Since I was
  897. ** too lazy to construct my own object oriented menu
  898. ** system for now, this is the only part of MUI that needs
  899. ** "gadtools.library". Well, GadTools menus aren't that bad.
  900. ** Nevertheless, object oriented menus will come soon.
  901. **
  902.  
  903. ID_ABOUT    EQU 1
  904. ID_NEWVOL    EQU 2
  905. ID_NEWBRI    EQU 3
  906.  
  907. MyMenus        dc.b    NM_TITLE,0    ;--
  908.         dc.l    projecttitle
  909.         dc.l    0
  910.         dc.w    0
  911.         dc.l    0
  912.         dc.l    0
  913.         dc.b    NM_ITEM,0    ;--
  914.         dc.l    abouttext
  915.         dc.l    aboutkey
  916.         dc.w    0
  917.         dc.l    0
  918.         dc.l    ID_ABOUT
  919.         dc.b    NM_ITEM,0    ;--
  920.         dc.l    NM_BARLABEL
  921.         dc.l    0
  922.         dc.w    0
  923.         dc.l    0
  924.         dc.l    0
  925.         dc.b    NM_ITEM,0    ;--
  926.         dc.l    quittext
  927.         dc.l    quitkey
  928.         dc.w    0
  929.         dc.l    0
  930.         dc.l    MUIV_Application_ReturnID_Quit
  931.  
  932.         dc.l    NM_END        ;--
  933.  
  934. projecttitle    dc.b    "Project",0
  935.         even
  936. abouttext    dc.b    "About...",0
  937.         even
  938. aboutkey    dc.b    "?",0
  939. quittext    dc.b    "Quit",0
  940.         even
  941. quitkey        dc.b    "Q",0
  942.  
  943.  
  944. **
  945. ** Here are all the little info texts
  946. ** that appear at the top of each demo window.
  947. **
  948.  
  949. IN_Master    dc.b    9,"Welcome to the MUI demonstration program. This little toy will show you how easy it is to create graphical user interfaces with MUI and how powerful the results are."
  950.         dc.b    10,9,"MUI is based on BOOPSI, Amiga's basic object oriented programming system. For details about programming, see the 'ReadMe' file and the documented source code of this demo. Only one thing so far: it's really easy!"
  951.         dc.b    10,9,"Now go on, click around and watch this demo. Or use your keyboard (TAB, Return, Cursor-Keys) if you like that better. Hint: play around with the MUI preferences program and customize every pixel to fit your personal taste.",0
  952.         even
  953. IN_Notify    dc.b    9,"MUI objects communicate with each other with the aid of a broadcasting system. This system is frequently used in every MUI application. Binding an up and a down arrow to a prop gadget e.g. makes up a scrollbar, "
  954.         dc.b    "binding a scrollbar to a list makes up a listview. You can also bind windows to buttons, thus the window will be opened when the button is pressed."
  955.         dc.b    10,9,"Remember: The main loop of this demo program simply consists of a Wait(). Once set up, MUI handles all user actions concerning the GUI automatically.",0
  956.         even
  957. IN_Frames    dc.b    9,"Every MUI object can have a surrounding frame. Several types are available, all adjustable with the preferences program.",0
  958.         even
  959. IN_Images    dc.b    9,"MUI offers a vector image class, that allows images to be zoomed to any dimension. Every MUI image is transformed to match the current screens colors before displaying."
  960.         dc.b    10,9,"There are several standard images for often used GUI components (e.g. Arrows). These standard images can be defined via the preferences program.",0
  961.         even
  962. IN_Groups    dc.b    9,"Groups are very important for MUI. Their combinations determine how the GUI will look. A group may contain any number of child objects, which are positioned either horizontal or vertical."
  963.         dc.b    10,9,"When a group is layouted, the available space is distributed between all of its children, depending on their minimum and maximum dimensions and on their weight."
  964.         dc.b    10,9,"Of course, the children of a group may be other groups. There are no restrictions.",0
  965.         even
  966. IN_Backfill    dc.b    9,"Every object can have his own background, if it wants to. MUI offers several standard backgrounds (e.g. one of the DrawInfo pens or one of the rasters below)."
  967.         dc.b    10,"The prefs program allows defining a large number of backgrounds... try it!",0
  968.         even
  969. IN_Listviews    dc.b    9,"MUI's list class is very flexible. A list can be made up of any number of columns containing formatted text or even images. Several subclasses of list class (e.g. a directory class and a volume class) are available. "
  970.         dc.b    "All MUI lists hav the capability of multi selection, just by setting a single flag."
  971.         dc.b    10,9,"The small info texts at the top of each demo window are made with floattext class. This one just needs a character string as input and formats the text according to its width.",0
  972.         even
  973. IN_Cycle    dc.b    9,"Cycle gadgets, radios buttons and simple lists can be used to let the user pick exactly one selection from a list of choices. In this example, all three possibilities are shown. Of course they are connected via broadcasting, "
  974.         dc.b    "so every object will immediately be notified and updated when necessary.",0
  975.         even
  976. IN_String    dc.b    9,"Of course, MUI offers a standard string gadget class for text input. The gadget in this example is attached to the list, you can control the list cursor from within the gadget.",0
  977.         even
  978.  
  979.  
  980. **
  981. ** These are the entries for the cycle gadgets and radio buttons.
  982. **
  983.  
  984. CYA_Computer    dc.l    st11,st12,st13,st14,st15,st16,st17,st18,st19,NULL
  985. st11        dc.b    "Amiga 500",0
  986. st12        dc.b    "Amiga 600",0
  987. st13        dc.b    "Amiga 1000 :)",0
  988. st14        dc.b    "Amiga 1200",0
  989. st15        dc.b    "Amiga 2000",0
  990. st16        dc.b    "Amiga 3000",0
  991. st17        dc.b    "Amiga 4000",0
  992. st18        dc.b    "Amiga 4000T",0
  993. st19        dc.b    "Atari ST :(",0
  994.         even
  995.  
  996. CYA_Printer    dc.l    st21,st22,st23,NULL
  997. st21        dc.b    "HP Deskjet",0
  998. st22        dc.b    "NEC P6",0
  999. st23        dc.b    "Okimate 20",0
  1000.         even
  1001.  
  1002. CYA_Display    dc.l    st31,st32,st33,NULL
  1003. st31        dc.b    "A1081",0
  1004. st32        dc.b    "NEC 3D",0
  1005. st33        dc.b    "A2024",0
  1006. st44        dc.b    "Eizo T660i",0
  1007.         even
  1008.  
  1009.  
  1010. **
  1011. ** For every object we want to refer later (e.g. for broadcasting purposes)
  1012. ** we need a pointer.
  1013. **
  1014.  
  1015. AP_Demo        dc.l    0
  1016.  
  1017. WI_Master    dc.l    0
  1018. WI_Frames    dc.l    0
  1019. WI_Images    dc.l    0
  1020. WI_Notify    dc.l    0
  1021. WI_Listviews    dc.l    0
  1022. WI_Groups    dc.l    0
  1023. WI_Backfill    dc.l    0
  1024. WI_Cycle    dc.l    0
  1025. WI_String    dc.l    0
  1026.  
  1027. BT_Notify    dc.l    0
  1028. BT_Frames    dc.l    0
  1029. BT_Images    dc.l    0
  1030. BT_Groups    dc.l    0
  1031. BT_Backfill    dc.l    0
  1032. BT_Listviews    dc.l    0
  1033. BT_Cycle    dc.l    0
  1034. BT_String    dc.l    0
  1035. BT_Quit        dc.l    0
  1036.  
  1037. PR_PropA    dc.l    0
  1038. PR_PropH    dc.l    0
  1039. PR_PropV    dc.l    0
  1040. PR_PropL    dc.l    0
  1041. PR_PropR    dc.l    0
  1042. PR_PropT    dc.l    0
  1043. PR_PropB    dc.l    0
  1044.  
  1045. LV_Volumes    dc.l    0
  1046. LV_Directory    dc.l    0
  1047. LV_Computer    dc.l    0
  1048. LV_Brian    dc.l    0
  1049.  
  1050. CY_Computer    dc.l    0
  1051. CY_Printer    dc.l    0
  1052. CY_Display    dc.l    0
  1053.  
  1054. MT_Computer    dc.l    0
  1055. MT_Printer    dc.l    0
  1056. MT_Display    dc.l    0
  1057.  
  1058. ST_Brian    dc.l    0
  1059.  
  1060. GA_Gauge1    dc.l    0
  1061. GA_Gauge2    dc.l    0
  1062. GA_Gauge3    dc.l    0
  1063.  
  1064. BP_Wheel    dc.l    0
  1065.  
  1066.  end
  1067.